var mysql = require('mysql');

/*var pool = mysql.createPool({
	user : 'root',
    	password : '',
    	database : 'book',
    	charset : 'UTF-8'
});*/
var pool = mysql.createPool('mysql://root:@localhost/book?charset=UTF-8');
var info =  'js服务器端编程';
pool.query('insert into link_(name,info,url,add_time) values(\'node.js\',?,\'http://nodejs.org\',sysdate())', info, function(err, rows, field){
	if(err){
		console.log(err.message);
		pool.end();
		return;
	}
	console.log('ID:' + rows.insertId);
	pool.end();
});
